import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import App from './App.vue'
import router from './router'
// import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

import './static/css/reset.css'
import '../node_modules/bootstrap/dist/css/bootstrap.min.css'
import '../node_modules/bootstrap/dist/js/bootstrap.bundle'
import '../node_modules/bootstrap-icons/font/bootstrap-icons.min.css'
import './static/css/font.css'
import 'vant/lib/index.css'
import { Toast, Pagination, Dialog, List } from 'vant'

// 创建应用实例
const app = createApp(App)

// 配置 Pinia 并添加持久化插件
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

// 插件注册顺序
// app.use(ElementPlus, {
//   message: {
//     offset: 100,
//   },
// })
// app.use(ElementPlus)
app.use(pinia)
app.use(router)
app.use(Toast)
app.use(Pagination)
app.use(Dialog)
app.use(List)

// 挂载应用
app.mount('#app')
